// IBRPG Launcher
// copyright Andrew Wooldridge 2007

var theHead = document.getElementsByTagName('head')[0];
var theResources = [
	{url:"yahoo-dom-event.js",type:"js"},
	{url:"animation-min.js",type:"js"},
	{url:"container-min.js",type:"js"},
	{url:"dragdrop-min.js",type:"js"},
	{url:"assets/container.css",type:"css"},
	{url:"json.js",type:"js"},
	{url:"ibrpg.js",type:"js"}
	]

var bootStrap = function(){
	for(i = 0; i< theResources.length; i++){
		var item = theResources[i];
		if(item.type === "js"){
			var newScript = document.createElement('script');
			newScript.setAttribute('src',item.url);
			theHead.appendChild(newScript);
		}else{
			if(item.type === "css"){
				var newStyle = document.createElement('link');
				newStyle.setAttribute('href',item.url);
				newStyle.setAttribute('rel','stylesheet');
				newStyle.setAttribute('type','text/css');
				theHead.appendChild(newStyle);
			}
		}
	}


}

bootStrap();	